1. Field of the Invention
The present invention relates to a debugging kernel system which is used in an integrated development environment system.
2. Description of the Related Art
Currently, supporting tools for developing systems built in to home electric appliances and cellular phones (hereinafter abbreviated to built-in systems), such as an integrated development environment (IDE), have been developed and put on the market.
An integrated development environment is a development tool whereby all of the programming steps up to testing can be executed under one environment.
FIG. 9 is a schematic diagram of the framework of an integrated development environment.
Generally, the current integrated development environment (development tool) includes a personal computer (hereinafter referred to as host machine) 17, a board built in a product (hereinafter referred to as a target board) 18, and a network 19 via which the host machine 17 is connected to the target board 18. Thereafter, the host machine 17 produces a program. The produced program is downloaded to the target board 18, is executed on the target board 18, and is corrected by checking the executing status on the target board 18 via the host machine 17.
FIG. 10 is a diagram for illustrating the functions of tools used under the integrated development environment.
The integrated development environment is executed by using functions operating on the host machine 17 and the target board 18.
The functions on the host machine 17 mainly comprise a program producing tool 20 for producing programs, e.g., an editor, and a program debugging tool 21 for debugging the programs. The functions on the target board 18 mainly comprise an agent function 22 for transmitting the operating status of the target board 18 to the functions on the host machine 17, and a kernel 23 for controlling an application program 24 produced by a user as well as the agent function 22.
Among the functions operating on the target board 18, the application program 24 produced by the user and the kernel 23 become a built-in project 25.
If only a proprietary kernel (kernel having an original specification) is supported, the following inconveniences occur.
That is, a conventional integrated development environment is developed and presented by a kernel vendor and thus the kernel used by a product developer (hereinafter referred to as a user) is limited to the proprietary kernel which is developed by the kernel vendor. Therefore, the user of the integrated development environment must automatically adopt the proprietary kernel of the kernel vendor in the product.
However, the kernel sold by the kernel vendor is based on a royalty system. In the case of using the kernel in the product, the user has to pay a high royalty to the kernel vendor when the product is sold.
Because the kernel is proprietary, the specifications do not match the functions of the product when executed, and the user cannot change the specifications. If the user desires to develop a system without using the proprietary kernel, the user cannot develop the system under the integrated development environment.
If the user develops the system by using a kernel having a different specification, the user has to prepare different development tools, thereby necessitating a large investment for a different development environment. If the development environment changes depending on the product development project, the efficiency decreases and storage also becomes complex.
In summary, the following problems when using only the proprietary kernel from the kernel vendor are: (1) a project using a kernel with a different specification must be developed by using different development tools; (2) a kernel from a different kernel vendor cannot be used; and (3) a high royalty must be paid, etc.
Next, a description of the relationship between the integrated development environment and the existing development tools is given.
Current integrated development environments cooperate with tool from various other companies (third parties) and, thereby, the user can use existing development tools. However, the available development tools are determined by the provider of the integrated development environment, not by the user. Unless a company and a product development project have a large influence, it is impossible to integrate and use a desired development tool in the integrated development environment.
It is very important for a developer to be able to efficiently debug a system which is integrated in a product during the development of the built-in system. When the integrated system is developed, in many cases, the system is first produced on a target board and then the system is integrated in the product. Therefore, when the target board is formed, a so-called ROM monitor is frequently used. Generally, the ROM monitor can monitor signals in the hardware, etc., but cannot debug a kernel which is integrated in the product. In a system which uses no kernel, there is a problem in that a large number of debugging functions cannot be used.
The following environments are required for a system developed under the integrated development environment.
(1) A standard specification kernel enables the use of a product having any desired specification and a product manufactured by any desired company, and also enables the use of any system without a kernel.
(2) If the standard specification kernel in (1) is assumed to be xcexcITRON (Micro Industrial/The Real-time Operating system Nucleus), OSEK/VDX (Open System and the Corresponding Interfaces for Automotive Electronics), or POSIX (Portable Operating System Interface for UNIX), the kernel can correspond to environments other than the above-mentioned one.
It is an object of the present invention to provide a debugging kernel system which can respond to the requirements for a system developed under the above-described integrated development environment (environment tool).
In order to achieve the above objects, a debugging kernel system according to the present invention includes a host system including a program debugging tool, and a target machine having a kernel which includes a product subsystem, and a target subsystem having a debugging kernel which includes a thread scheduling function and an interrupt process function on the target subsystem, wherein the debugging kernel controls the product subsystem and the target subsystem which has a function operating thereon that is loaded as a thread for control thereby, and the thread scheduling function assigns a priority to the threads and determines a process to be executed next by scheduling according to the priority, and the interrupt process function executes an interrupt process by performing a predetermined process between the product subsystem and the target subsystem so as to prevent the product subsystem from preempting a process of the debugging kernel.
The product subsystem includes a product kernel for calling a scheduler of the debugging kernel before the scheduling ends and a task is thereafter executed and for informing the debugging kernel of the priority of a thread to be currently executed, and the debugging kernel compares the priority with the priority of the thread to be currently executed and determines the process to be executed.
The target subsystem has an abstract kernel, and a thread operating on the target subsystem uses the debugging kernel via an interface of the abstract kernel.
The debugging kernel has a system mode and a user mode for a debugging status of a product subsystem.